<template>
    <van-nav-bar 
		class="myhead"
		custom-style="background:#62B158;" 
	>
		<template #left>
			<slot name="left">
				<view v-if="!noback" class="back"  @click="gotoback"  >
					<van-icon name="arrow-left" />
					<text>返回</text>
				</view>
			</slot>
		</template>
		<template #title>
			 <view  style="color:#fff" v-if="title" class="head-title van-nav-bar__title van-ellipsis "> {{ title  }}</view>
		</template>
    </van-nav-bar>
</template>

<script>
    export default {
        methods:{
            gotoback(){
                uni.navigateBack()
            }
        },
        props:{
            title:String,
		    noback:Boolean 
        }
    }
</script>

<style lang="scss">
	.myhead{
		background: #62B158 !important;
		position: fixed;
		width: 100%;
		top: 0;
		left: 0;
		z-index: 1000;
		color:#fff;
		.head-title {
			color: #fff !important;
			font-size: 28rpx !important;
			font-weight: 500;
		}
		.back {
			color: #fff;
		}
	}
</style>